package main

import "log"

type ServerCallBack struct {
}

func (server *ServerCallBack) OnDisConected(*WsConnection) {
	log.Print("callback disconnected")
}

func (server *ServerCallBack) OnConected(*WsConnection) {
	log.Print("callback connected")
}

func (server *ServerCallBack) OnDataRecv(cnn *WsConnection, dat []byte) {
	log.Print("callback data recv" + string(dat))
}

func main() {
	InitDB()

	server := WsServer{}
	server.SetProto(&ServerCallBack{})

	server.StartServer("0.0.0.0:9555")

}
